<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@page import="com.easy.base.service.impl.ESession"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
	ESession eSession = ESession.create(session);
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
<%@include file="/jsp/include/common.jsp"%>
</head>
<body style="background-color: #ccccff;">
	<center>
		<div style="margin: 100px 0;"></div>
		<div class="easyui-panel" title="" style="width: 500px; padding: 30px 70px 20px 70px">
			<div style="float: left;margin:0px 0px 30px -20px;"><img alt="" src="<%=request.getContextPath() %>/assets/img/yqjc2.png" style="width:100px;height:50px; "></div>
			<div style="float: right;font-size: 20px;color: #999999;margin:10px 60px 0px 0px;font-weight: bold;"><%=eSession.local("login.jsp.Title.login.system.info", "FCC匹配数据处理平台") %></div>
			<form id="loginForm"
				action="<%=request.getContextPath()%>/LoginController/login.do"
				method="post"><br><br><br>
				<div style="margin-bottom: 20px">
					<input class="easyui-textbox" id="userid" name="userid" value=""
						style="width: 100%; height: 40px; padding: 12px"
						data-options="prompt:'',iconCls:'icon-man',iconWidth:38">
				</div><br>
				<div style="margin-bottom: 20px">
					<input class="easyui-textbox" type="password" id="password" value=""
						name="password" style="width: 100%; height: 40px; padding: 12px"
						data-options="iconCls:'icon-lock',iconWidth:38">
				</div>
				<br>
			</form>
			<div onclick="login()" id="login">
				<a href="#" class="easyui-linkbutton c1"
					style="padding: 5px 0px; width: 100%;"> <span
					style="font-size: 14px;"><%=eSession.local("login.jsp.Title.Login", "登录") %></span>
				</a><p>
			</div>
		</div>
	<%-- 	<a href="#" onclick="test()" class="easyui-linkbutton c1"
					style="padding: 5px 0px; width: 100%;"> <span
					style="font-size: 14px;"><%=eSession.local("login.jsp.Title.Login", "登录") %></span>
				</a> --%>
	</center>
	

</body>
<script type="text/javascript">

	//回车绑定登录事件
	$(window).keydown(function(event){
	  	if(event.keyCode == 13) {
	  	login()
	  	}
		});
	$(function() {
		changeThemeFun('gray');
		//if ($.cookie('easyuiThemeName')) {
		//	changeThemeFun($.cookie('easyuiThemeName'));
		//}
		changeThemeFun('metro');
		//添加验证
		$('#userid').textbox({
			required : true
		});
		$('#password').textbox({
			required : true
		});
	});
	function login() {
		$('#loginForm').form(
				'submit',
				{
					onSubmit : function() {
						return $(this).form('enableValidation')
								.form('validate');
					},
					success : function(result) {
						result = $.parseJSON(result);
						if (result.successful) {
							window.location.href = getRootPath()
									+ "/LoginController/goToMainPage.do";
						}
						$.messager.show(result);
					}
				});
		
	}
	 
</script>
</html>
